package com.xbongbong.paas.constant;

/**
 * 常量值
 *
 * @ClassName XbbConstant
 * @Author 梁鲁江
 * 创建时间 2021/5/26 10:26
 * 修改时间  2021/5/26 10:26
 **/
public class XbbConstant {
    /**
     * 集合的初始化大小
     */
    public static int INITIALCAPACITY = 1 << 4;
    /**
     * 分隔符
     */
    public static String SEPARATOR = "_";

    public static String FILEPREFIX = "xbbData";
    /**
     * 仓库表redis前缀
     */
    public static String WAREHOUSE_KEY = "warehouse_key";
    /**
     * 表字段的redis前缀
     */
    public static String TABLE_COLUMS_KEY = "table_colums_key";
    /**
     * 使用sql提取json中的double值
     */
    public static String JSON_EXTRACT_DOUBLE = "JSONExtractFloat";
    /**
     * 使用sql提取json中的String值
     */
    public static String JSON_EXTRACT_STRING = "JSONExtractString";

    /**
     * 使用sql提取json中的String值
     */
    public static String JSON_EXTRACT = "JSONExtract";
    /**
     * 使用sql提取json中的ARRAY值
     */
    //TODO
    public static String JSON_EXTRACT_ARRAY = "JSONExtractRaw";
    public static String JSON_EXTRACT_RAW = "JSONExtractRaw";
    /**
     * JSONExtractArrayRaw
     */
    public static String JSON_EXTRACT_ARRAY_RAW = "JSONExtractArrayRaw";
    /**
     * 使用sql提取json中的GEO，location
     */
    //TODO
    public static String JSON_EXTRACT_GEO = "JSONExtractRaw";
    /**
     * 使用sql提取data（时间戳）
     */
    public static String JSON_EXTRACT_BIGINT = "JSONExtractInt";

    public static String JSON_EXTRACT_INT = "JSONExtractInt";
    /**
     * If the value exists in the JSON document, 1 will be returned.
     * If the value does not exist, 0 will be returned.
     */
    public static String JSON_HAS = "JSONHas";
    /**
     * 团队数据的整合
     */
    public static String JSON_TEAM_FUN = "JSON_TEAM_FUN";
    /**
     * 团队主数据的整合
     */
    public static String JSON_TEAM_MAIN_FUN = "JSON_TEAM_MAIN_FUN";
    /**
     * 团队数据转JSONString
     */
    public static String TEAM_TO_JSON_FUNC = "TEAM_TO_JSON_FUNC";
    /**
     * flink 类型的定义
     */
    public static String JSON_EXTRACT_USERTEAM = "JSONExtractString";
    /**
     * 类型转化为int64
     */
    public static String TO_INT_64 = "toInt64";
    /**
     * toInt64OrZero
     */
    public static String TO_INT_64_OR_ZERO = "toInt64OrZero";
    /**
     * 类型转化为toFloat64
     */
    public static String TO_FLOAT_64 = "toFloat64";
    /**
     * 前缀
     */
    public static String PREF = "pref_";
    /**
     * 团队结果表后缀
     */
    public static String TEAM = "_team";
    /**
     * 团队中间表后缀
     */
    public static String SINK = "_sink";
    /**
     * 增量表的后缀
     */
    public static String INCR = "incr";
    /**
     * 一小时
     */
    public static Integer ONE_HOUR = 60 * 60;
    /**
     * 一天
     */
    public static Integer ONE_DAY = 86400;
    /**
     * 空格
     */
    public static String SPACE = " ";
    /**
     * final关键字
     */
    public static String FINAL = " FINAL ";
    public static String GROUP_ID = " group by id ";
    /**
     * AND关键字
     */
    public static String AND = " AND ";
    /**
     * EQUAL关键字
     */
    public static String EQUAL = " = ";
    /**
     * > 关键字
     */
    public static String G_T = " > ";
    /**
     * OR关键字
     */
    public static String OR = " OR ";
    /**
     * LENGTH关键字
     */
    public static String LENGTH = " LENGTH ";
    /**
     * LEFT  SEMI　JOIN关键字
     */
    public static String LEFT_SEMI_JOIN = "  LEFT  SEMI　JOIN  ";
    /**
     * LEFT  　JOIN关键字
     */
    public static String LEFT_JOIN = "  LEFT  JOIN  ";

    /**
     * INNER  　JOIN关键字
     */
    public static String INNER_JOIN = "  INNER  JOIN  ";

    /**
     * 
     */
    public static String DATA = "`data`";
    /**
     * 提取时间戳（ck方言）
     */
    public static String TO_UNIX_TIMESTAMP = "toUnixTimestamp";
    /**
     * 提取时间戳（标准sql通用版）
     */
    public static String UNIX_TIMESTAMP = " UNIX_TIMESTAMP";
    /**
     * 转换为日期格式（含时分秒的标准格式）
     */
    public static String TO_DATE_TIME = "toDateTime";
    /**
     * 转换为日期格式
     */
    public static String TO_DATE = "toDate";
    /**
     * toWeek 或者 toStartOfWeek 的起始参数  0 Sunday（默认），1 Monday（国人思维）
     */
    public static int MODE = 1;
    /**
     * Returns the difference between two dates or dates with time values.     ck跟starRocks的函数前缀通用，但函数入参不同
     */
    public static String DATE_DIFF = "dateDiff";

    /** starRocks 特有的函数，跟ck不通用 */
    public static String YEARS_DIFF = "years_diff";
    public static String MONTHS_DIFF = "months_diff";
    public static String HOURS_DIFF = "hours_diff";
    public static String MINUTES_DIFF = "minutes_diff";
    /**/

    /**
     * 左括号LEFT_PARENTHESIS
     */
    public static String L_P = "(";
    /**
     * 右括号RIGHT_PARENTHESIS
     */
    public static String R_P = ")";
    /**
     * 左括号LEFT_Brackets
     */
    public static String L_B = "[";
    /**
     * 右括号RIGHT_Brackets
     */
    public static String R_B = "]";

    /**
     * point
     */
    public static String POINT = ".";

    public static String PERCENT = "%";
    /**
     * 团队负责人
     */
    public static String TEAM_MAIN = "team_main";
    /**
     * 团队负责人-驼峰写法
     */
    public static String TEAMMAIN = "teamMain";
    /**
     * 团队负责人
     */
    public static String MY_TEAM_MAIN = "myTeamMain_";

    public static String OWNER_ID = "owner_id";
    /**
     * 团队协同人
     */
    public static String TEAM_CO = "team_co";
    /**
     * 团队协同人
     */
    public static String MY_TEAM = "myTeam_";
    /**
     * sql 逗号
     **/

    public static String SQL_COMMA = ",";

    /**
     * 单引号
     **/

    public static String SINGLE_QUOTES = "'";
    public static String DOUBLE_QUOTES = "\"";

    public static String UPDATE_TIME = "update_time";
    public static String ADD_TIME = "add_time";
    /**
     * 去重
     */
    public static String DISTINCT = "DISTINCT";

    public static String AS = " AS ";
    public static String ON = " ON ";
    public static String SELECT = "SELECT ";

    /**
     * 降序
     **/

    public static String ORDER_DESC = "desc ";
    public static String IS_PUBLIC = "isPublic";
    /**
     *  Ampersand 
     */
    public static String  AMPERSAND = "&";
    public static String  DOLLER = "$";
    public static String  ARRAY_ELEMENT = "arrayElement";
    public static String  ARRAYS_OVERLAP = "arrays_overlap";
    public static String  ARRAY_LENGTH = "array_length";
    public static String  ARRAY_CONTAINS = "array_contains";
    public static String  ARRAY_INTERSECT = "array_intersect";
    public static String  JSON_STRING = "json_string";
    public static String  JSON_QUERY = "JSON_QUERY";
    public static String  NOT_EQUAL = "!=";
    public static String  IS_NOT = " is not ";
    public static String  GREATER_EQUAL = ">=";
    public static String  GREATER = ">";
    public static String  LESS_THAN = "<";
    public static String  NOT_LIKE = "NOT LIKE";
    public static String  LIKE = "LIKE";
    public static String  STRING_CONSTANT = "String";
    public static String  ORDER_BY = " ORDER BY ";
    public static String  GROUP_BY = " GROUP BY ";
    public static String MULTI_IF = "multiIf";
    public static String CASE = "CASE";
    public static String WHEN = "WHEN";
    public static String THEN = "THEN";
    public static String END = "END";
    public static String IF = "IF";
    public static String IF_NULL = "IFNULL";

    public static String  IN = " IN ";
    public static String  NOT_IN = " NOT IN ";
    public static String  JOIN_L = "joinL";
    public static String  JOIN_R = "joinR";
    public static String  SQL_NULL = "null";
    public static String  NULL_OR_EMPTY = "null_or_empty";
    public static String  WHERE_TRUE = "where true ";
    public static String  TRUE = " true ";
    public static String WHERE = " WHERE ";
    public static String LIMIT = " LIMIT ";
    public static String FROM = " FROM ";
    public static String COUNT_ALL = " count(*) ";
    public static String TYPE = "type";
    public static String FORM_ID = "formId";
    public static String BUSINESS_TYPE = "businessType";
    public static String DATA_SET_ID = "dataSetId";
    public static String INPUT = "input";
    public static String SOURCE_NAME = "name";
    public static String SAAS_MARK = "saasMark";
    public static String DISTRIBUTOR_MARK = "distributorMark";
    public static String REQ_SOURCE_CHART = "chart";
    public static String REQ_SOURCE_BOARD = "board";
    public static String SUB_FORM_PARENT = "subForm_";

    /**
     * 统计表的默认size
     */
    public static  int STATISTICS_PAGE_SIZE = 10;
    public static  int ZERO = 0;
    public static  int TWO = 2;

    /**
     * 根据指定的精度级别，将一个日期时间截断 DATETIME date_trunc(VARCHAR fmt, DATETIME|DATE datetime)
     */
    public static String DATE_TRUNC = " date_trunc";
    /**
     * 将 UNIX 时间戳转化为对应的 TIME 格式
     */
    public static String FROM_UNIXTIME = " FROM_UNIXTIME";

    public static String CAST = " CAST";

    public static String CONCAT = "CONCAT";
    public static String THE_CROSSED = "-";
    public static String ALL_STAR = "*";
    public static String DS_FIELD = "field";
    public static String FIELD_CHECKED = "fieldChecked";
    public static String ID_ONE = "id_1";
    public static String UNDEFINED = "undefined";


    public static String GET_JSON_STRING = " get_json_string ";
    public static  int CUSTOMER_COMMUNICATE_PART_NUM = 64;
    public static  int CUSTOMER_USER_PART_NUM = 64;
    public static  int OTHER_PART_NUM = 64;
    public static  String COUNT = "COUNT";
    public static  String COUNTD = "COUNTD";



}

